<div class="col-md-12" style="padding:15px;">
    <table width="90%" class="table table-bordered table-striped">
        <tr>
            <th width="20%">Post Title</th>
            <th width="10%">Category</th>
            <th width="10%">Location</th>
            <th width="10%">Posting Date</th>
            <th>Latitude</th>
            <th>Longitude</th>
            <th width="10%">Thumbnail</th>
            <th width="10%">Actions</th>
        </tr>

        <?php foreach ($query as $data) { ?>
        <tr>
            <td>
              <a href="<?php echo site_url("Home/post/$data[id_post]") ?>" target="_blank"><?php echo $data['post_title'] ?></a>
            </td>
            <td><?php echo $data['category_name'] ?></td>
            <td><?php echo $data['location_name'] ?></td>
            <td><?php echo $data['post_date'] ?></td>
            <td><?php echo $data['latitude'] ?></td>
            <td><?php echo $data['longitude'] ?></td>
            <td><img src="<?php echo base_url() ?>/Images/Post_Thumb/<?php echo $data['thumbnail'] ?>" width="90px"/></td>
            <td align="center">
                <a href="<?php echo site_url("Post/update_post/$data[id_post]") ?>" class="btn btn-xs btn-warning"><i class="fa fa-eraser fa-2x fa-fw"></i></a>
                <a href="<?php  echo site_url("Post/delete_post/$data[id_post]") ?>" data-toggle="modal" class="btn btn-xs btn-danger"><i class="fa fa-trash-o fa-2x fa-fw"></i></a>
            </td>
        </tr>
        <?php } ?>
    </table>
    <?php echo $halaman; ?>


  <?php if(count($query) <1) : ?>
    <div class="alert alert-danger" style="text-align: center; width:80%; margin:0px auto 20px auto;">
        <i class="fa fa-frown-o fa-5x"></i><br/>You still don't have a post. <a href="<?php  echo site_url('User/new_entry') ?>">Click Here</a> to make your first post.
    </div>
<?php endif; ?>
</div>
